<template>
	<satri-page :padding="20">
		<satri-popup v-model="visible">
			<satri-text value="云想衣裳花想容，春风拂槛露华浓。" />
		</satri-popup>

		<satri-popup v-model="visible_modal" :modal="false" :padding="0">
			<satri-button type="primary" @tap="visible_modal = false">点我关闭</satri-button>
		</satri-popup>

		<satri-popup v-model="visible_custom" background-color="#333" border-radius="20rpx">
			<satri-text color="#fff" value="云想衣裳花想容，春风拂槛露华浓。" />
		</satri-popup>

		<satri-popup v-model="visible_left" direction="left">
			<satri-text value="云想衣裳花想容，春风拂槛露华浓。" />
		</satri-popup>

		<satri-popup v-model="visible_top" direction="top">
			<satri-text value="云想衣裳花想容，春风拂槛露华浓。" />
		</satri-popup>

		<satri-popup v-model="visible_right" direction="right">
			<satri-text value="云想衣裳花想容，春风拂槛露华浓。" />
		</satri-popup>

		<satri-popup v-model="visible_bottom" direction="bottom">
			<satri-text value="云想衣裳花想容，春风拂槛露华浓。" />
		</satri-popup>

		<satri-card label="基础用法">
			<satri-button @tap="visible = true">打开</satri-button>
		</satri-card>

		<satri-card label="不显示遮罩层">
			<satri-button @tap="visible_modal = true">打开</satri-button>
		</satri-card>

		<satri-card label="添加样式">
			<satri-button @tap="visible_custom = true">打开</satri-button>
		</satri-card>

		<satri-card label="方向">
			<satri-button @tap="visible_left = true">左边</satri-button>
			<satri-button @tap="visible_top = true">上边</satri-button>
			<satri-button @tap="visible_right = true">右边</satri-button>
			<satri-button @tap="visible_bottom = true">下边</satri-button>
		</satri-card>
	</satri-page>
</template>

<script lang="ts" setup>
import { ref } from "vue";

const visible = ref(false);
const visible_modal = ref(false);
const visible_custom = ref(false);

const visible_left = ref(false);
const visible_top = ref(false);
const visible_right = ref(false);
const visible_bottom = ref(false);
</script>
